<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>表格换色</title>
		<script type="text/javascript" src="../js/jquery-1.12.4.js" ></script>
	</head>
	<body>
		<table border="1" width="500" height="300">
			<tr>
				<td>编号</td>
				<td>姓名</td>
				<td>年龄</td>
				<td>地址</td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
		</table>
		
		<script type="text/javascript">
			$(function(){
				/*$("tr:gt(0)").mouseover(function(){
					$(this).css("background-color","skyblue");
				}).mouseout(function(){
					$(this).css("background-color","white");
				});*/
				$("tr:gt(0)").hover(function(){
					$(this).css("background-color","skyblue");
				},function(){
					$(this).css("background-color","white");
				});
				
			});
			
		</script>
		
	</body>
</html>
